<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style-type: none;
        }
        .content {
            position: absolute;
            width: 100%;
            height: 100%;

        }
        .box {
            width: 60%;
            height: 50%;
            border: 1px solid gray;
            background: pink;
        }
        /* .center .box {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        } */
        /* .center {
            display: flex;
            justify-content: center;
            align-items: center;
        } */
        .center {
            display: table-cell;
            text-align: center;
            vertical-align: middle;
        }
        .center .box {
            display: inline-block;
            vertical-align: middle;
        }
    </style>
</head>
<body>
    <div class="content center">
        <div class="box"></div>
    </div>
</body>
</html>